package proj.pt.model;

import java.util.Date;

public class User extends PersistentImpl{

	private String roleId;
	private String address;
	private String phoneNo;
	private String email;
	
	private String studentId;
	private String registrationNo;
	private Date dob;
	private String sex;
	private String batch;
	private SubCourse subCourse;
	
	private String staffId;
	private Department department;
	
	private String username;
	private String password;
	private Boolean activeStatus = Boolean.TRUE;
	
	private String newPassword;
	private String retypePassword;
	
	// these variables are not used in database.
	private Boolean updateLoginDetails = Boolean.FALSE;
	private Course course;
	
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public Department getDepartment() {
		return department;
	}
	public void setDepartment(Department department) {
		this.department = department;
	}
	public Date getDob() {
		return dob;
	}
	public void setDob(Date dob) {
		this.dob = dob;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getPhoneNo() {
		return phoneNo;
	}
	public void setPhoneNo(String phoneNo) {
		this.phoneNo = phoneNo;
	}
	public String getRegistrationNo() {
		return registrationNo;
	}
	public void setRegistrationNo(String registrationNo) {
		this.registrationNo = registrationNo;
	}
	public String getRoleId() {
		return roleId;
	}
	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public String getStaffId() {
		return staffId;
	}
	public void setStaffId(String staffId) {
		this.staffId = staffId;
	}
	public String getStudentId() {
		return studentId;
	}
	public void setStudentId(String studentId) {
		this.studentId = studentId;
	}
	public SubCourse getSubCourse() {
		return subCourse;
	}
	public void setSubCourse(SubCourse subCourse) {
		this.subCourse = subCourse;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getRetypePassword() {
		return retypePassword;
	}
	public void setRetypePassword(String retypePassword) {
		this.retypePassword = retypePassword;
	}
	public Boolean getUpdateLoginDetails() {
		return updateLoginDetails;
	}
	public void setUpdateLoginDetails(Boolean updateLoginDetails) {
		this.updateLoginDetails = updateLoginDetails;
	}
	public String getNewPassword() {
		return newPassword;
	}
	public void setNewPassword(String newPassword) {
		this.newPassword = newPassword;
	}
	public Course getCourse() {
		return course;
	}
	public void setCourse(Course course) {
		this.course = course;
	}
	public String getBatch() {
		return batch;
	}
	public void setBatch(String batch) {
		this.batch = batch;
	}
	public Boolean getActiveStatus() {
		return activeStatus;
	}
	public void setActiveStatus(Boolean activeStatus) {
		this.activeStatus = activeStatus;
	}	
	
	public boolean equals(Object obj){
		if(obj instanceof User && obj != null){
			
			if(this.getId() != null && 
					this.getId().equals(((User)obj).getId())){
				return true;
			} //end if
		} //end if
		
		return false;
	}
	
}
